package com.hope.onlinestudy.activity.register

import android.text.TextUtils
import com.hope.onlinestudy.mvp.BasePresenterImpl
import com.hope.onlinestudy.utils.Utils

/**
 * MVPPlugin
 * 邮箱 784787081@qq.com
 */
class RegisterPresenter :
    BasePresenterImpl<RegisterContract.View>(),
    RegisterContract.Presenter {
    override fun startRegister(phone: String?) {
    }

    override fun getCode(phone: String?) {
        if (TextUtils.isEmpty(phone)) {
            mView?.showMsg("手机号不能为空")
            return
        }

        if (!Utils.isMobileNO(phone!!)) {
            mView?.showMsg("手机号不正确")
            return
        }
    }
}